package ai.restosuite.infrastructure.operation.work;

import org.apache.commons.lang3.StringUtils;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.TaskService;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@RestController
public class WebController {

    @Autowired
    RuntimeService runtimeService;

    @Autowired
    TaskService taskService;
    @GetMapping("/test")
    public String startProcessInstance(@RequestParam("processDefineKey")String processDefineKey,
                                       @RequestParam("startUser")String startUser) {
        System.out.println("请求进入。。。。。。。。。。。。。。。。");
        return "ok";
    }

    @PostMapping("/testPost")
    public String startProcessInstance(@RequestBody Map<String, Object> map) {
        System.out.println("请求进入。。。。。。。。。。。。。。。。"+map);
        return "ok";
    }
}
